package zuoye;

import java.util.HashMap;
import java.util.Map;

public class Student {

	private Map<String,Integer> studentSc;
	
	public Student(){
		studentSc = new HashMap<>();
	}
	//添加学生分数信息
	public void addStudentSc(String id,int score){
		studentSc.put(id, score);
	}
	
	//查询学生分数信息
	public Integer getStudentScore(String id){
		return studentSc.get(id);
	}
	
	//删除学生分数信息
	public void removeStudentScore(String id){
		studentSc.remove(id);
	}
	
	//遍历并打印所有学生分数信息
	public void printAllStudentSc(){
		for(Map.Entry<String,Integer>entry:studentSc.entrySet()){
			System.out.println();
		}
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
	}

}
